import Storage from "./storage";
export default function Logger(to, from) {
    if (!from) {
        from = {
            route: "",
            options: ""
        }
    }
    let logs = Storage.get("statistics_page", []);
    if (!Array.isArray(logs)) {
        logs = [];
    }
    logs.push({
        to: to.url,
        timestamp: +new Date(),
        from: from.url
    });
    Storage.set("statistics_page", logs)
}